/**
 * 
 */
package com.zte.claa.inficombo.csa.app.controller.ret;

import java.util.Date;

/**
 * @author 0283000115
 *
 */
public class CmccOneNetRptData {
	public static final int MSG_TYPE_CPDATA = 1;	// 设备上传数据点消息
	public static final int MSG_TYPE_DEVST  = 2;	// 设备上下线消息
	public static final int MSG_TYPE_CMDACK = 7;	// 缓存命令下发后结果上报（仅支持NB设备）
	
	public static final int STATUS_ON 	= 1;	// 设备上线
	public static final int STATUS_OFF  = 0;	// 设备下线
	
	private int type = 0; 	//int,标识消息类型, 1：设备上传数据点消息; 2：设备上下线消息; 7：缓存命令下发后结果上报（仅支持NB设备）
	private String dev_id; 	//int, 设备ID
	private String ds_id;	//string, 数据流名称
	private long at = 1; 	//int, 平台时间戳,单位ms	
	private int status = -1;		//设备上下线标识； 0：设备下线； 1：设备上线；
	private int login_type = 10;	//int	设备登录协议类型， 1-EDP, 6-MODBUS, 7-MQTT, 10-NB-IoT
	private int cmd_type = 0; 		//int	命令响应的类型， 1：设备收到cmd的ACK响应信息； 2：设备收到cmd的Confirm响应信息
	private String cmd_id;	//string	命令ID。 	
	private Object value; 	//具体数据部分，为设备上传至平台或触发的相关数据，详见说明：
	// 用于记录原始的json字符串（仅针对命令异步响应类型）
	private String originMsg;
	
	public CmccOneNetRptData(){
		
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getDev_id() {
		return dev_id;
	}

	public void setDev_id(String dev_id) {
		this.dev_id = dev_id;
	}

	public String getDs_id() {
		return ds_id;
	}

	public void setDs_id(String ds_id) {
		this.ds_id = ds_id;
	}

	public long getAt() {
		return at;
	}

	public void setAt(long at) {
		this.at = at;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getLogin_type() {
		return login_type;
	}

	public void setLogin_type(int login_type) {
		this.login_type = login_type;
	}

	public int getCmd_type() {
		return cmd_type;
	}

	public void setCmd_type(int cmd_type) {
		this.cmd_type = cmd_type;
	}

	public String getCmd_id() {
		return cmd_id;
	}

	public void setCmd_id(String cmd_id) {
		this.cmd_id = cmd_id;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}
	
	public String getOriginMsg() {
		return originMsg;
	}

	public void setOriginMsg(String originMsg) {
		this.originMsg = originMsg;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("type=").append(this.type).append("; ");
		sb.append("dev_id=").append(this.dev_id).append("; ");
		sb.append("ds_id=").append(this.ds_id).append("; ");
		sb.append("at=").append(this.at).append("[").append(new Date(at)).append("]; ");
		sb.append("status=").append(this.status).append("; ");
		sb.append("login_type=").append(this.login_type).append("; ");
		sb.append("cmd_type=").append(this.cmd_type).append("; ");
		sb.append("cmd_id=").append(this.cmd_id).append("; ");
		sb.append("value=").append(this.value);
		return sb.toString();
	}
}
